package com.ruoyi.ams.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 优惠券表
 * </p>
 *
 * @author kenny
 * @since 2021-10-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("ams_discount_coupon")
public class DiscountCoupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    /**
     * 优惠券名称
     */
    private String name;

    /**
     * 类型(1-满减,2-折扣)
     */
    private Integer type;

    /**
     * 折扣金额
     */
    private BigDecimal discountAmount;

    /**
     * 优惠券可使用金额
     */
    private BigDecimal startAmount;

    /**
     * 优惠券订单最大金额
     */
    private BigDecimal endAmount;

    /**
     * 满减金额
     */
    private BigDecimal reductionAmount;

    /**
     * 开始时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人
     */
    private String createFrom;

    private Date updateTime;

    private Date updateFrom;


}
